package com.starssea.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.StringJoiner;

@Service
public class SomeService {

    @Value("${app.name}")
    private String name;

    @Value("${app.owner}")
    private String owner;

    @Value("${app.port: 8009}")
    private Integer port;

    @Value("${app.site}")
    private String site;

    @Value("${app.description}")
    private String description;

    public void printValue() {
        StringJoiner joiner = new StringJoiner(",");
        joiner.add(name).add(owner).add(String.valueOf(port)).add(site).add(description);

        System.out.println(joiner.toString());
    }
}
